package com.flyme.module.base.provider.service.impl;

import com.flyme.core.base.supper.service.impl.BaseServiceImpl;
import com.flyme.module.base.client.entity.SysEducation;
import com.flyme.module.base.client.entity.SysWorkCourse;
import com.flyme.module.base.client.enums.WorkingYearEnum;
import com.flyme.module.base.provider.mapper.SysEducationMapper;
import com.flyme.module.base.provider.service.SysEducationService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class SysEducationServiceImpl extends BaseServiceImpl<SysEducationMapper, SysEducation> implements SysEducationService {

    /**
     * 根据用户查询教育经历
     */
    public SysEducation findByUserId(Long userId) {
        return getOne(q().eq(true,"userId", userId), false);
    }

    /**
     * 根据用户查询教育经历
     */
    public Integer countByUserId(Long userId) {
        return count(q().eq(true,"userId", userId));
    }

    /**
     * 根据用户查询教育经历
     */
    public List<SysEducation> selectByUserId(Long userId) {
        return list(q().eq("userId", userId));
    }


}
